package cn.wolfcode.luowowo.repository;

import cn.wolfcode.luowowo.domain.Region;
import cn.wolfcode.luowowo.domain.Strategy;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface StrategyRepository extends MongoRepository<Strategy,String> {

    List<Strategy> findByDestId(String id);
    List<Strategy> findByDestId(String id, PageRequest of);
    List<Strategy> findByCatalogId(String id);
    List<Strategy> findByDestIdOrderByViewnum(String id);

    List<Strategy> findByDestName(String keyword);
}
